﻿namespace AesonBaseFramework.EntityFramework.DbContexts
{
    public class DbConnectionInfo
    {
        public static DbConnectionInfo Create(string user, string server, string database,
            string dbLogin, string dbPassword)
        {
            var c = new DbConnectionInfo
            {
                DbSecurityType = DbSecurityType.Login,
                User = user,
                Server = server,
                Database = database,
                DbLogin = dbLogin,
                DbPassword = dbPassword
            };
            return c;
        }

        public static DbConnectionInfo Create(string user,string server,string database)
        {
            var c = new DbConnectionInfo
            {
                DbSecurityType = DbSecurityType.Integrated,
                User = user,
                Server = server,
                Database = database
            };
            return c;
        }

        public string User { get; set; }
        public string Server { get; set; }
        public string Database { get; set; }
        public string DbLogin { get; set; }
        public string DbPassword { get; set; }
        public DbSecurityType DbSecurityType { get; set; }

    }
}